home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
019a
/
obsali.zip
/
ALIAS.DOC
next >
Wrap
Text File
|
1991-09-23
|
33KB
|
945 lines
Obs Toolkit (TM)
Alias component
User Manual
A DOS toolkit
providing ultimate capability to
Command Line and Batch users
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Contrails, Inc.
P.O. Box 2759
Lompoc, CA 93438-2759
CIS 71121,2426
Program created by
Keith E. Robbins
Copyright (c) 1991
by Contrails, Inc.
All rights reserved
Alias (ALIAS)
-------------
Description:
ALIAS is a tool to allow synonyms to be created and executed as a
part of DOS. It is a clean and easy way to build custom commands
without having to resort to disk eating batch files.
Commands can be as simple as
1) Renaming a program to something you are more comfortable with
2) Invoking a program that isn't in your path
3) Invoking a program with certain options
4) Bypassing internal commands to something a tad bit more usable
Notes:
ObsRes must be installed in order for ALIAS to operate.
Aliases do not function in batch files. We haven't built that
tool yet, so in your batch files you'll have to type out each
command with the correct options selected.
Aliases do not work in all DOS shells. To minimize this
inconvenience ReRes reinstates aliases in shells that have
disabled them.
Aliases all come with spaces. If you do not want a space at the
end of your alias, then you must prefix the definition with the
/NOSPACE qualifier.
Alias provides five (5) functions:
1) Placing aliases into the dictionary (e.g., ALIAS name command)
2) Outputting the dictionary in a form suitable for /FILE
processing or batch files (e.g., ALIAS > name.bat)
Note: Redirection will not store the comments which may be in
your alias definition file.
3) Setting translation options (e.g., ALIAS /ON)
4) Getting status on current translation options (ALIAS /STATUS)
5) Editing existing aliases (ALIAS /EDIT name)
TIPS:
Use Alias to build custom commands.
-1-
Once an alias is defined, you can bypass it by preceding the command
with a space. Assuming that DIR has been aliased (e.g., ALIAS dir
LF).
C>DIR - this would invoke the aliased DIR (lf)
C> DIR - this would invoke DOS's DIR
Usage:
ALIAS
This displays all currently defined aliases.
ALIAS name
This displays the translation (if any) for NAME.
ALIAS [/NOSPACE] name command
This defines an alias where NAME translates to COMMAND.
ALIAS /NULL name
This defines a null alias.
ALIAS [options]
The options are defined and described below.
Options:
/[NO]CAse - observe case of alias names
This option instructs the translator to view aliases as case
sensitive. This means that cd != CD (is not equal to). The case
of commands is always retained regardless of this option.
Use /NOCASE to disable case sensitivity.
/CLear - delete all aliases
This command deletes all aliases. When ObsRes is first installed,
the alias dictionary is clear.
/Delete - delete an alias
Usage: ALIAS /DELETE name
This removes an alias definition. If the alias does not exist
then no error is reported.
TIP:
Create an unalias command to remove aliases.
C>ALIAS unalias ALIAS /DELETE
/[NO]ECho - echo translations to the console
This option instructs the translator to echo the translation
command to the console whenever a substitution is made. The
translation is output to the display just below the command
line.
This command is directly available as a ".COMMAND" from the
command line (.ECHO).
-2-
TIP:
This can be useful to learn commands and their options.
Echo can let you know when translations are occurring.
Use /NOECHO to disable echo translations.
/EDit - edit the specified alias definition
Usage: ALIAS /EDIT name
This command will bring up a line editor to allow you to edit
the current alias name/command pair. Using the line editor is
simple and intuitive. Refer to "Getting Started / Line Editor"
for a description of the line editor commands.
TIP:
When you want to make a change to an existing alias, don't
redefine it; /EDIT it.
Note:
When you change the name of the alias, the old alias is
neither deleted nor modified in any way. You can use the
editor as a quick and dirty way to make a copy of an existing
alias.
/File - process alias commands from a file
Usage: ALIAS [/CLEAR] /FILE filename.ext
This option directs the alias generator to read the specified
file and process the commands as if they were issued at the
command line.
DOS commands ECHO and REM are processed the same as DOS would.
ECHO controls whether commands are echoed to the console or
not and can be used to display messages to the console.
REM can be used to place comments into the alias definition
file.
The DOS 3.3+ '@' command qualifier is processed also. It inhibits
echo of the current line regardless of the ECHO state.
Alias definition files can be nested. The nesting limit is
limited only by the maximum number of open files.
Note:
Unlike DOS batch processing, the initial ECHO mode for alias
definition files when processed by the alias generator is ECHO
OFF.
-3-
If a line in the alias definition file is not understood by
the alias generator, then an error message for that line will
be posted. The line will be ignored and processing will
continue with the next line.
/CLEAR can be used to clear out the existing aliases before
loading in the new set.
/Make - define a path alias
Usage: ALIAS /MAKE name
This option defines a path alias. The alias is defined to be
ALIAS /NOSPACE name <current directory>\
The command is provided so that the TRYIT.BAT program can provide
direct access to the commands without knowing, in advance, which
directory the Toolkit was placed into.
/NOSpace - do not add a space after the name when translating
Usage: ALIAS /NOSPACE name cmd
This option is valid during an alias definition only. Use of this
option directs the translator not to place a space after the
translation. This allows catenation of an alias with its
supporting text.
Example:
C>ALIAS /NOSPACE chmod MF /SA
C>chmod +r file.exe
When CHMOD is issued at the command line the first command line
argument will be directly appended to the translation. This
yields (using the example above)
C>MF /SA+r file.exe
/NUll - define a null alias
Usage: ALIAS /NULL name
This option allows you to define a NULL alias. One that
translates to nothing. This option allows you to place a prefix
before a command name and to disable it when necessary. This
option needs recursion to be active in order to be effective.
Example:
C>ALIAS /RECURSE
C>ALIAS /NULL ob
C>ALIAS ocd ob ocd.exe
C>ALIAS cd ocd
-4-
When CD is typed at the command line, the command will be
equivalent to C>OCD.EXE. If OB were to be defined as
C>ALIAS /NOSPACE ob c:\util\
then, when CD is typed at the command line, the command will
be equivalent to C>C:\UTIL\OCD.EXE
/ON - enable translator (default)
This option returns the translator to its active state. If the
translator was already active, then no change will occur.
This command is also directly available as a ".COMMAND" from the
command line (.ON).
/OFf - disable translator
This option causes the translator to become passive. This may be
handy if some program needs the aliased commands and it is not
convenient to precede them by a space.
This command is also directly available as a ".COMMAND" from the
command line (.OFF).
TIP:
If ALIAS translations affect one of your programs adversely
(keeps swapping your text), then use a batch file to turn the
aliases off, execute your program and then turn the aliases
on again.
/Page - Page the output
This instructs ALIAS to pause when outputting aliases and the
screen is full.
/[NO]Recurse - Recursively apply aliases
This allows aliases to be defined in terms of other aliases.
After an aliased command is translated, the translator will
attempt to translate the new command.
Use /NORECURSE to disable recursive alias translations.
Note:
The recursion process is limited to ten levels. If more than
ten levels are detected, the translator will report an error
and the command line will be ignored. This is to prevent an
endless loop (when a command aliases back to itself).
TIP:
Use recursive aliases to reduce program access time.
Example:
C>ALIAS /RECURSE
C>ALIAS dir LF
C>ALIAS bytime LF /OD
C>ALIAS lf ob lf.exe
C>ALIAS /NOSPACE ob c:\util\
-5-
When the DIR, or BYTIME command is issued, the translator
will use "c:\util\lf.exe ". This way, LF can be accessed
immediately without DOS having to search the PATH.
You can verify this performance advantage by using
C>LOCATE dir
You can see the translation passed to the command line by
enabling the /ECHO feature.
The performance advantage may not be so noticeable if you
are using good disk caching software or a very fast disk.
/Status - Get current status of the alias translator
Display the mode that the alias translator is working in. The
status information tells whether the translator is active or
passive (on or off); whether or not the translator is case
sensitive; whether or not translation echoes are being performed;
whether or not aliases are being applied recursively; the number
of aliases defined and the amount of free space available in the
translator's buffer.
Examples:
C>ALIAS unalias ALIAS /DELETE
This defines UNALIAS to be equivalent to ALIAS /DELETE. Whenever
you want to delete an alias just type UNALIAS CMD.
C>ALIAS > aliases.bat
This uses DOS redirection to create a batch file that saves the
current aliases and alias translator settings. The batch file can
be executed later to add these aliases back into the translation
table. If you chose to keep comments in your alias definition
file, then it is better to use an editor to add permanent aliases.
Redirection does not store comments.
TIP:
Use DOS redirection to save your aliases in a batch file.
C>ALIAS > myalias.bat
That file can be processed by DOS (as a batch file) or by
ALIAS using the /FILE option. Letting ALIAS process the file
is significantly quicker.
TIP:
Place OBSRES in your autoexec.bat file and then call the alias
definition file (which you create) with ALIAS /FILE so that the
aliases that you want to keep are available each time you reboot
or power-up your machine.
C>ALIAS /STATUS
This tells you what the current configuration the translator is
executing under. It reports translator conditions such as:
-6-
o Case sensitivity (on / off)
o Translator (on / off)
o Recursion (on / off)
o Echo (on / off)
o Number of aliases defined
o Size and space available in alias dictionary
C>ALIAS /NOSPACE ob c:\util\
This will define an alias named OB. The alias definition is
special in that when a translation occurs, it will not append a
space after the translated text.
C>ALIAS lf ob lf.exe
Using the OB alias definition above and recursive aliases, the
translation for LF will be C:\UTIL\LF.EXE. This principle is
applied to all of OBS ToolKit commands that are supplied in the
recursive alias definition file.
C>ALIAS /NULL ob
This would cause the translation of OB to be nothing. Using the LF
definition immediately above and recursive aliases, the
translation of LF will be LF.EXE. The use of the NULL qualifier
allows you to revert back to path searching when invoking aliased
commands.
C>ALIAS unalias
This will show you the translation of UNALIAS if it exists. If
UNALIAS does not exist, then no operation will be performed.
Notes:
If you are more comfortable with case sensitive aliases, then use
the /CASE switch.
Note:
If you do switch from CASE to NOCASE then the NAME with the
nearest upper-case character will take precedence over the NAME
without. When you switch back from NOCASE to CASE, order will be
returned.
=> The above rule is true even when you redefine or delete an alias
name.
The alias dictionary size defaults to 2K bytes but can be set via
ObsRes at its installation time.
Default configuration for the translator is:
1) Case insensitive
2) Echo disabled
3) Translator active
4) Recursion disabled
-7-
ObsRes
------
Description:
ObsRes is a well behaved memory resident utility (TSR) that provides
a central focal point to Obs Toolkit. All of Obs tools, except for
Alias, will function without ObsRes, but some functionality will be
lost.
ObsRes serves four (4) key functions:
1) Performs the Alias translations from NAME to COMMAND
2) Maintains the Alias dictionary in resident RAM
3) Maintains the DirStack (directory stack) in resident RAM
4) Offers DOT commands to control translator operations.
====> ObsRes must be installed after any command line editors.
Command line editors play around with the input, and ObsRes
will never see it.
If it is necessary to load ObsRes before such a program, then
you can use ReRes to get control back.
If you use a DOS command line editor (many are available), then the
recall buffer will contain the command that you typed. If you don't
use a command line editor (why would you not?) then the command
recall (F3) will contain the translated command.
If you are using NDOS or 4DOS and you want to use Obs Aliases, then
issue the SETDOS command with the /L1 option. This will inform NDOS
and 4DOS to get keyboard input the same way that COMMAND.COM does.
Each alias defined takes the number of characters defined plus five
(5) bytes of overhead (four (4) on /NOSPACE definitions).
Each DirStack entry takes up 67 bytes.
The sum space requested is combined with ObsRes resident code to
produce the resident space requirement. The actual amount of memory
reserved for a TSR is variable depending upon the current
environment block and the TSRs Drive:\Path\FileName.exe.
Usage:
OBSRES [Dictionary size [DirStack Depth]]
Options:
Dictionary Size
Specifies the number of bytes to retain for alias definitions.
This directly affects the size of the resident image. For each 16
bytes, 1 paragraph (16 bytes) is reserved.
-8-
Minimum size - 128 bytes
Hardly enough for anything serious.
Maximum size - 4096 bytes
More than enough for even the most serious. If this is not
enough, then we apologize. The limit is there to inhibit the
unaware from eating up too much memory. Send us a request,
we'll grow to meet your needs.
Default size - 2048 bytes
A modest amount that will meet the needs of most users.
TIP:
Use ALIAS /STATUS to determine the slack space in the Alias
dictionary.
DirStack Depth
Specifies the number of locations to be maintained on the
directory stack.
Minimum depth - 1 entry
This allows you to return from whence you came and provides
one (1) SmartPath.
Maximum depth - 9 entries.
This is a lot for even the most keen. This is a hard and fast
limit. You can only use one letter to identify a disk, and all
the characters are reserved by DOS.
Default depth - 4 entries.
This provides for ample POPs, and four (4) SmartPaths.
Internal Commands:
ObsRes has four (4) internal DOT commands to configure its'
operation. The internal commands are there to permit you to enable
and disable certain features of the Toolkit during the customization
process.
.ECHO -- Enable the translation echo
.NOECHO -- Disable the translation echo
.OFF -- Disable the translator
.ON -- Enable the translator
The .ON and .OFF are particularly handy when optimizing system
performance by setting the definition of the "OB" alias. If the
response "Bad command or file name" occurs, because the "OB" alias is
defined incorrectly, then typing ".OFF" will place COMMAND.COM back
into control.
-9-
The .ECHO and .NOECHO can be used to see what the effect of the
translation is, so that the bad command can be isolated, and
corrected.
The ".COMMAND" operations are further described in ALIAS under their
appropriate "/COMMAND". The ".COMMANDs" are not available in batch
files.
Examples:
OBSRES
This will install ObsRes into memory with a default dictionary
size of 2K and a default DirStack depth of 4 entries. The memory
burden on your system will be roughly 4000 bytes.
OBSRES 1024 9
This will install ObsRes into memory with a dictionary size of 1K
and a DirStack of 9 entries. The memory burden on your system
will be roughly 3400 bytes.
TIP:
You can load ObsRes into High memory using an intelligent memory
manager such as the ones provided by DOS 5, Quarterdeck or Qualitas.
This will allow you to maximize your conventional memory.
If don't want obs aliases then use the stand-alone DirStack.
-10-
ReRes
-----
Description:
ReRes is also a memory resident utility. We discovered the need for
it when we would shell into DOS from Windows/real mode and DESQview,
only to discover that we had lost our aliases. The DirStack was
still available, and we could list aliases, but the commands just
weren't getting swapped. We lost our powers, what a horror.
The answer was to gen up a tiny utility (128 resident bytes) to get
back into the driver's seat. This is about as small as a TSR can get
without getting heavy into playing musical bytes.
ReRes serves one (1) function:
1) To regain aliases after you shell into a program that disables
them.
====> ReRes can be installed to regain alias control after a program
has hidden ObsRes.
ObsRes must have previously been installed. ReRes works with ObsRes
only.
If ObsRes is still functional (not locked out) when ReRes is
installed, the effect will be to nest the application of aliases one
level for each ReRes installed.
Note: DOSKEY, NDOS, and 4DOS users
ReRes cannot claim back the command line after these programs have
been installed.
-11-
Line Editor
-----------
A simple line editor is provided in the Alias and EnvEdit tools. This
editor allows you to perform the following actions:
Up Arrow Move one line up (multiple line display only)
Down Arrow Move one line down (multiple line display only)
Left Arrow Move one character to the left
Right Arrow Move one character to the right
INSERT Toggle Insert/Overstrike mode
HOME (^A) Move to the beginning of the edit field
END (^E) Move to the end of the edit field
DELETE (^D) Delete the current character
BACKSPACE Delete the previous character
RETURN Store changes and exit
ESCAPE Abort changes and exit
ErrorLevels
-----------
A simple, but flexible policy on DOS ErrorLevels has been consistently
applied to all tools. The higher the error level, the more critical the
error was to the normal operation of the tool. At the bottom, or
errorlevel 0, is "NO ERRORs", while at the top, errorlevel 6 is an
"INSTALL" error, where the tool was unable to execute.
The ErrorLevels are as follows:
0 - NO ERROR - No error encountered
1 - NOT FOUND - File or object was "NOT FOUND"
2 - ABORTED - The user chose to "ABORT" the operation
3 - OPERATION FAILED - The requested "OPERATION FAILED"
4 - LIMIT EXCEEDED - The operation exceeded the tools "LIMIT"
5 - USAGE ERROR - The tool displayed a "USAGE" error
6 - INSTALL FAILED - The tool was unable to "INSTALL"
-12-
Options
-------
o Options may be placed on the command line in any order.
o Options are processed from left to right.
o Options must be seperated by spaces.
o Options may appear anywhere on the command line (after the tools
name). For consistency in the examples provided, all options were
placed before the user supplied arguments.
Exception:
o ALIAS will only accept /NOSPACE, /NULL, /MAKE and /EDIT options
during an alias definition, and those options must be present
before the name of the alias to be defined.
o Throughout this document, options were defined in UPPER and lower
case. The UPPER case portion is the minimum string recognized by the
tools. The lower case is the remainder of the option name. The lower
case portion is always optional, but if present must match.
Reading the Usage
-----------------
Parameters specified between '[' & ']' are optional. Their presence is
not required (the specific operation is dictated by the particular
tool).
Parameters specified between '{' & '}' are repeatable.
Parameters separated by a '|' are one or the other.
You do not type the above symbols!
Press any key...
----------------
To pause a scrolling display, you may specify /Page as an option or by
pressing the <ESC> key during the scroll.
When the computer is waiting at the "Press any key to continue..."
prompt, you may enter the <ESC> key for a continuous scroll, or any
other key to view the next screenful.
-13-
Registration
------------
To register this component of Obs Toolkit, fill out the order form and
mail with payment to the address specified. You have the option of
registering the entire Toolkit (highly recommended). You can select that
option on the registration form also.
Component Registration
----------------------
Individual component registration is $8.00 per component.
Upon receipt of your order for only a component of Obs Toolkit, a thank
you letter will be promptly mailed to you. If there are any serious bugs
reported in the software, you will be automatically updated at no extra
cost to you.
Toolkit Registration
--------------------
Obs Toolkit registration is $39.00
Upon receipt of your order for the entire Toolkit, a registered version
of Obs Toolkit will be promptly mailed to you. You will then be entitled
to updates at a reduced cost. If there are any serious bugs reported in
the software, you will be automatically updated at no extra cost to you.
Toolkit registration includes a registered version and a printed manual.
Technical Support
-----------------
Technical support is always available. If after one (1) hour of phone
support you are asking basic questions (answers readily available in the
documentation), then the "free" technical support will be exhausted and
will become an additional cost item.
Individual Use
--------------
Registration of a Toolkit component is $8.00.
Registration for the complete Toolkit is $39.00 plus shipping and handling.
California residents must pay sales tax.
Corporations / Institutions
---------------------------
Site licenses are not available for Toolkit components.
A license to use Obs Toolkit is required in corporations and
institutions. The license will allow duplication of the Toolkit at a
single site for the number of copies purchased. The cost of the license
is based on the number of machines on which the Toolkit will be running.
The schedule of fees is as follows:
-14-
Number of copies Price per copy
---------------- --------------
1 $39.00
2 - 9 28.00
10 - 24 24.00
25 - 49 21.00
50 - 100 19.00
All payments must be in U.S. dollars.
Regardless of the quantity ordered, only one (1) manual, and one disk
containing the registered copy of the Toolkit will be mailed. Upon
receipt, you will be authorized to make as many copies of the Toolkit as
you are licensed. The printed manual may not be reproduced. Additional
printed manuals are $6.00 each.
Refund Policy
-------------
Each registration comes with a 30 day, no questions asked, money back
guarantee. In the event of a system incompatibility, the guarantee is
extended to a full 90 days.
Upon receipt of properly returned merchandise, Contrails will refund the
full purchase price of the software less shipping and handling. Contrails
will not accept items returned with insufficient postage or COD charges.
Before you return the Toolkit you must contact Contrails, Inc. for a
Return Authorization number. Returns will not be accepted without one.
You must return the registered disk, and manuals in good condition.
ASP Ombudsman
-------------
This program is produced by a member of the Association of Shareware
Professionals (ASP). ASP wants to make sure that the shareware principle
works for you. If you are unable to resolve a shareware-related problem
with an ASP member by contacting the member directly, ASP may be able to
help. The ASP Ombudsman can help you resolve a dispute or problem with an
ASP member, but does not provide technical support for members' products.
Please write to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442-
9427 or send a Compuserve message via CompuServe Mail to ASP Ombudsman
70007,3536"
-15-